<template>
	<view class="show-item-wrap">
		<view class="show-item" v-for="item in list">
			<view class="img">
				<image :src="item.img || src" mode="aspectFill"></image>
			</view>
			<view class="title">
				春天来了你说吼吼吼哈世界的繁华就将计就计()/tihao 很厉害
			</view>
			<view class="avatar-nickname-like">
				<view class="avatar-nickname">
					<image :src="src"></image>
					<view class="nickname">
						王老五
					</view>
				</view>
				<view class="like">
					<u-icon name="thumb-up" size="34"></u-icon> 110
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "showItem",
		props: {
			list: {
				type: Array,
				default () {
					return []
				}
			}
		},
		data() {
			return {
				src: 'https://www.auok.ltd/background.jpg'
			};
		},
		computed: {
			list11() {
				console.log('xx', this.list)
			}
		}
	}
</script>

<style lang="scss">
	.avatar-nickname-like {
		display: flex;
		align-items: center;
		justify-content: space-between;

		.avatar-nickname {
			display: flex;
			align-items: center;

			image {
				width: 60rpx;
				height: 60rpx;
				border-radius: 50%;
				margin-right: 10rpx;
				will-change: transform
			}
		}
	}

	.show-item {
		display: inline-block;
		width: 46%;
		margin: 20rpx 2%;
		font-size: 28rpx;
		color: #333;

		.title {
			word-wrap: break-word;
			overflow: hidden;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 2;
			-webkit-box-orient: vertical;
			margin: 20rpx 0;
		}

		.img {
			width: 100%;

			image {
				width: 100%;
				min-height: 400rpx;
				max-height: 500rpx;
				border-radius: 10rpx;
			}
		}
	}

	.show-item-wrap {
		margin: 0 15rpx;
	}
</style>
